import { identity, isNumber, pickBy } from 'lodash';
import request from '@/http/request';
import { IQueryParams } from '@/widgets/table-pagination';

export function getList(queryParams: IQueryParams) {
  let params: any = {
    ...queryParams,
    pageNo: queryParams.pageNum,
    ...pickBy(queryParams.filter, identity),
    ...pickBy(queryParams.filter, isNumber),
  };

  return request.post(`/admin-api/system/dept/list`, params);
}
